home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
BBS_UTL
/
DDPLUS71
/
ANSIMENU.ZIP
/
ANSIMENU.DOC
next >
Wrap
Text File
|
1995-03-14
|
4KB
|
88 lines
ANSI MENU ROUTINES UNIT
Copyright 1995
By Scott M. Baker and Bob Dalton
INTRODUCTION:
------------
Sometimes you are going to want an ANSI menu of sometype
for your door program. This unit adds that function to
the DDPlus package. The ANSIMENU.PAS code included in
this archive is FREEWARE and can be used in any manner you
want and without cost, but remains copyrighted to Scott Baker.
The news.exe program, news.pas and supporting files remains
copyrighted to Scott Baker. The ANSI Menu routines portion
of this document remain copyrighted to Scott Baker. Everything
else is copyrighted by Bob Dalton.
REQUIREMENTS:
------------
At this point in time the only requirements are that you must
be using Borland Turbo Pascal version 6.0 or 7.0. I compiled
the program with Borland Pascal 7.0 Professional and know it
works. I expect it will with TP 6.0 as well but can't guarantee
it. You must also have already compiled the main DDPLUS.PAS
unit BEFORE compiling the NEWS.PAS.
Files Included
--------------
Below is a listing of all files for the ANSIMENU.ZIP Package:
NEWS.CTL - Required Configuration file for the NEWS.EXE Program
NEWS.DIR - Required file for the NEWS.EXE Program.
ANSIMENU.DOC- The text file you are reading.
NEWS.EXE - Compiled version of the News.pas program. So you
see it in action immediately.
ANSIMENU.PAS- The ansi menu unit.
NEWS.PAS - The News program by Scott Baker.
Installation and Preparation for Use
------------------------------------
1. Move the archive package to a temporary directory and "unzip".
2. Before compiling the NEWS.pas be sure that your compiler knows
where to find the listed units.
3. Try the news.exe program first to see the end product BEFORE
looking at the code in the provided units. It will give you a better
feel for what is going on.
4. That's it! Enjoy and good luck.
THE ANSI MENU ROUTINES
------------------------------
There is an additional TPU file included with the
DDPLUS package that includes a user-friendly ANSI-MENU
handler. The TPU can be called up with the statement "USES
ANSIMENU". The menu system is accessed by the single
function:
CHAR:=GetAnsiMenu(menu_definition_template)
The menu-definition-template type is declared within
the unit. It is identical to the structure below:
menutype = record
header: string[80];
footer: string[80];
headercolor,
footercolor,
optioncolor,
desccolor,
arrowcolor,
bracketcolor: byte;
numoptions: byte;
options: array[1..20] of string[1];
desc: array[1..20] of string[80];
end;
The structure is usually defined by your program as
a constant. The ANSIMENU procedure interprets this
strucure and uses it to generate a centered menu. The menu
options may be selected by using the numeric keypad (the 8
for up and the 2 for down) or by simply typing the the
letter of the option. A sample door, NEWS.PAS, is included
to demonstrate the use of the ansimenu unit.